/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package simcreature;

import javax.swing.ImageIcon;

/**
 *
 * @author Fari1Mat
 */
public class Lifeform extends Thread {
    public int x;
    public int y;
    public int size;
    public String name;
    public final ImageIcon icon;

    public Lifeform() {
        this(0,0,100,null);
    }
    public Lifeform(int x, int y, int size, String name){
        this.x = x;
        this.y = y;
        this.size = size;
        this.name =  name;
        this.icon = createIcon(name);
        Board.update(x,y,icon);
    }
    
    private ImageIcon createIcon(String s){
        String iconName = "resources/";
        iconName = iconName + s + ".gif";
        ImageIcon icon = new ImageIcon(iconName);
        return icon;
    }
    public int getX(){
        return this.x;
    }
    public int getY(){
        return this.y;
    }
    public int getSize(){
        return this.size;
    }
    public String getLName(){
        return this.name;
    }
    public ImageIcon getIcon(){
        return this.icon;
    }
}
